package com.xk.supply;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.web.WebApplicationInitializer;

@Slf4j
@SpringBootApplication
@MapperScan({"com.xk.supply.mapper"})
@ServletComponentScan
//@EnableTransactionManagement
//@EnableAspectJAutoProxy(proxyTargetClass = true)

public class SupplyApplication extends SpringBootServletInitializer implements WebApplicationInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(SupplyApplication.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(SupplyApplication.class, args);
        log.info("WEB服务已启动......");

    }

}
